#include "iphelper.h"

IPHelper::IPHelper(void) {

}
IPHelper::~IPHelper(void) {

}
void IPHelper::GetIPAddress(string hostName, string& output) {
	hostent* ht;
	ht = gethostbyname(hostName.c_str());
	if (ht) {
		output = inet_ntoa(*((struct in_addr *)ht->h_addr_list[0]));
	}
	else {
		output = "null";
	}
}